import React from 'react';
import {withRouter} from 'react-router-dom';
import './Login.css'
import '../../static/font/iconfont.css'


class Login extends React.Component {
    login=()=>{
        console.log(this.props)
       this.props.history.push('/Index') ;
    }
    render() {
        return (
            <div>
                < section id="mysec">
                    < div id="mydiv">
                        < div> Welcome To Team2 - Supermarket</div>
                        <div><img src={require("../../static/images/logo.png")} alt=""/></div>
                        <div id="user">
                            <label htmlFor="acc" className="lab">
                                <span className="iconfont icon-yuangong1"></span>
                            </label>
                            <input id="acc" className="acc" type="text" placeholder="请输入账号"/>
                        </div>
                        <div>
                            <label htmlFor="pas" className="lab">
                                <span className="iconfont icon-suocopy"></span>
                            </label>
                            <input id="pas" className="acc" type="password" placeholder="请输入密码"/>
                        </div>
                        <div id="denglu" onClick={this.login}>登录</div>
                        <div id="errormessage"></div>
                    </div>
                </section>
            </div>


        )
    }
}

export default withRouter(Login)